﻿@model IEnumerable<FCNS.ERP.Models.ErpPxPlan>

@{
    ViewBag.Title = "培训计划";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>@ViewBag.Title</h2>

<p>
    <a class="newObjA" href="/Px/PxPlanNew">新增</a>
</p>
<table class="table">
    <tr>

        <th>
            @Html.DisplayNameFor(model => model.Name)
        </th>
        <th>
            场地
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DateTimeStart)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DateTimeEnd)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DateTimeTrain)
        </th>
        <th> @Html.DisplayNameFor(model => model.CourseTime)</th>
        <th> @Html.DisplayNameFor(model => model.Price)</th>
        <th>
            @Html.DisplayNameFor(model => model.Summary)
        </th>
 

        <th>
            @Html.DisplayNameFor(model => model.Count)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.PxPlanStatus)
        </th>
        <th></th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>

            <td>
                @Html.DisplayFor(modelItem => item.Name)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Place.Name)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.DateTimeStart)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.DateTimeEnd)
            </td> 
            <td>
                @foreach (var v in item.DateTimeTrain.Split(';'))
                {
                    if (!string.IsNullOrEmpty(v))
                    {
                        @v
                        <br />
                    }
                }
            </td>
            <td> @Html.DisplayFor(modelItem => item.CourseTime)</td>
            <td>
                @item.Price.ToString("C")
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Summary)
            </td> 

            <td>
                @Html.DisplayFor(modelItem => item.Count)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.PxPlanStatus)
            </td>
            <td>
                @if (item.PxPlanStatus < FCNS.ERP.Models.ErpPxPlan.EnumPxPlanStatus.培训)
                {
                    @Html.ActionLink("编辑", "PxPlanEdit", new { id = item.Id }) @Html.Raw(" | ")
                    <a href="PxPlanDelete/@item.Id" class="objDelete">删除</a>
                }
            </td>
        </tr>
    }

</table>
